package cn.anecansaitin.whimsy.common.register;

import net.minecraft.core.registries.Registries;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class ModDamageSources {
    public static DamageSource owNoKnockback(@Nonnull Level level, @Nullable Entity direct, @Nullable Entity causing, @Nullable Vec3 pos) {
        return new DamageSource(level.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(ModDamageType.OW_NO_KNOCKBACK), direct, causing, pos);
    }
}
